package it.antonio.ilpizze.db.index.hash.memory;

import it.antonio.ilpizze.db.index.hash.Element;

public class MemoryEntry<K, V> implements Element<K, V> {

	private int hash;
	private K key;
	private V value;
	
	private Element<K, V> next;
	
	public MemoryEntry(int hash, K key, V value) {
		this.hash = hash;
		this.key = key;
		this.value = value;
	}

	@Override
	public int hash() {
		return hash;
	}

	@Override
	public K key() {
		return key;
	}

	@Override
	public void value(V value) {
		this.value = value;
	}

	@Override
	public V value() {
		return value;
	}

	@Override
	public Element<K, V> next() {
		return next;
	}

	@Override
	public void next(Element<K, V> next) {
		this.next = next;
	}

}
